package com.leanyuan.Infor.dto;

import com.leanyuan.Infor.domain.Action;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Actiondto {
    private Integer action_id;
    private String name;
    private String url;
    private Integer isLeaf;
    private Integer pid;
    private String component;
    private List<Actiondto> chie;
    public Actiondto(){};
    public Actiondto(Action action){
        this.name=action.getName();
        this.url=action.getUrl();
        this.isLeaf=action.getIsLeaf();
        this.pid=action.getPid();
        this.action_id=action.getActionId();
        this.component=action.getComponent();
        if(this.isLeaf==0){
            this.chie=new ArrayList<Actiondto>();
        }
    }
}
